<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <!-- 1、页面一：列表页面 -->
        <div tab heading="销售赠送出库" active="activeFlag[0]" ng-click="changeTab(0)">
            <div class="row wrapper-y-sm">
                <div class="operate-bar col-xs-4 font-0">
                    <!-- 列表上方操作按钮 -->
                    <button class="btn btn-operate m-r-sm" ng-disabled="!btnPermission.salesDonateOutAdd"
                        ng-click="addData()">新增</button>
                    <button class="btn btn-operate m-r-sm" ng-disabled="!btnPermission.salesDonateOutDel"
                        ng-click="delData('batch')">删除</button>
                    <button class="btn btn-operate m-r-sm" ng-disabled="!btnPermission.salesDonateOutPrint"
                        ng-click="batchPrint()">打印</button>
                </div>
                <div class="search-bar wrapper-none col-xs-8">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="search()" title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" title="配置表格列"
                            ng-click="switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>
                        <div class="btn btn-default base-color" ng-if="!!btnPermission.salesDonateOutExport">
                            <div title="导出">
                                <i class="yb-icon ico-export-o"></i>
                            </div>
                            <ul class="more-tool">
                                <li yb-download download-url="exportParam.sectionUrl"
                                    download-param="exportParam.sectionParam" download-key="ids">
                                    <i class="yb-icon ico-export-o"></i> 导出
                                </li>
                                <li yb-download download-url="exportParam.allUrl" download-param="condition" download-duration="3">
                                    <i class="yb-icon ico-export-o"></i> 导出全部
                                </li>
                            </ul>
                        </div>
                    </div>
                    <button class="btn-advance pull-right m-l-xs"
                        ng-click="switchToolbar('AdvanceSearch')">高级搜索</button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" placeholder="出库单号"
                            ng-model="condition.salesOutBillNo">
                        <span class="input-group-addon cursor-pointer" ng-click="search(1)">搜索</span>
                    </div>
                </div>
            </div>

            <!-- 列表查询条件 -->
            <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)"
                reset-data="reset()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label">出库单号：</label>
                        <input type="text" name="salesOutBillNo" ng-model="condition.salesOutBillNo"
                            class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">销售单号：</label>
                        <input type="text" name="salesBillNo" ng-model="condition.salesBillNo" class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">借用单号：</label>
                        <input type="text" name="salesBillNo" ng-model="condition.borrowBillNo" class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">客户名称：</label>
                        <input type="text" name="clientName" ng-model="condition.clientName" class="form-control">
                    </div>

                    <div class="form-group clearfix">
                        <label class="control-label">出库状态：</label>
                        <select name="outStatus" class="form-control" ng-model="condition.outboundStatus"
                            ng-options="item.id as item.name for item in outState">
                            <option value="">请选择</option>
                        </select>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">订单类型：</label>
                        <select class="form-control" ng-model="condition.billType">
                            <option value="">请选择</option>
                            <option value="1">普通</option>
                            <option value="2">三包</option>
                            <option value="3">赠送</option>
                        </select>
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label">出库时间：</label>
                        <input type="text" class="form-control date-picker" ng-model="condition.startOutboundDate"
                            datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="switchDataPicker(0)"
                            is-open="datePickerFlag[0]" close-text="关闭"
                            ng-change="checkDate(condition, 'startOutboundDate', 'endOutboundDate')" modal-size="small"
                            readonly>
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label"></label>
                        <label class="control-label wave-line">~</label>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"></label>
                        <input type="text" class="form-control date-picker" ng-model="condition.endOutboundDate"
                            datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="switchDataPicker(1)"
                            is-open="datePickerFlag[1]" close-text="关闭"
                            ng-change="checkDate(condition, 'startOutboundDate', 'endOutboundDate')" modal-size="small"
                            readonly>
                    </div>
                </div>
            </div>

            <!-- 显示列表数据 -->
            <div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tableConfig" col-fixed="true"
                has-check-col="true" set-tb-style="setFixedWidth()"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
                            <thead>
                                <tr>
                                    <th width="40" class="text-center border-l-none th-check">
                                        <div yb-check-box yb-checked="markInfo.allCheckedBill"
                                            yb-click="selectAll(dataList, 'Bill')"></div>
                                    </th>
                                    <th ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-click="toSort(tableConfig.tableCol, $index)"
                                        ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.fixedWidth"
                                            fixed-width="tbStyle.scrollLeft"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>

                    <div class="th-scroll-x" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-click="toSort(tableConfig.tableCol, $index)"
                                        ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.scrollWidth">
                                        </div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>

                    <div class="td-scroll-y" ng-show="dataList.length > 0">
                        <table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataList track by $index"
                                    ng-class="{'row-selected': $index === markInfo.cueRow}"
                                    ng-click="selectRow($index)">
                                    <td width="40" class="text-center border-l-none">
                                        <div yb-check-box yb-checked="item.isChecked"
                                            yb-click="selectSingle(item, dataList, 'Bill')"></div>
                                    </td>
                                    <td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <span
                                            ng-if="!itemCol.clickFn && itemCol.type !== 'operate'">{{item[itemCol.dataField]}}</span>
                                        <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)"
                                            ng-if="!!itemCol.clickFn">
                                            {{item[itemCol.dataField]}}
                                        </a>
                                        <div class="font-0" ng-if="itemCol.type === 'operate'">
                                            <button class="btn btn-operate m-r-xs"
                                                ng-disabled="!btnPermission.salesDonateOutPrint"
                                                ng-click="printSingle(item)">打印</button>
                                            <button ng-if="curOrg.isBarcode === 0"
                                                ng-disabled="(item.outboundStatus===2||item.outboundStatus===3)||!btnPermission.salesDonateOutOutbound"
                                                ng-click="outbound(item)" class="btn btn-operate m-r-xs">出库</button>
                                            <button class="btn btn-operate m-r-xs"
                                                ng-disabled="(item.outboundStatus!==0)||item.isState===1||!btnPermission.salesDonateOutEdit"
                                                ng-click="editData(item)">编辑</button>
                                            <button class="btn btn-operate m-r-xs" ng-click="delData('single', item.id)"
                                                ng-disabled="item.outboundStatus!==0||!btnPermission.salesDonateOutDel||item.checkState!==0">删除</button>
                                            <button class="btn btn-operate m-r-xs" ng-click="mandatoryFinish(item)"
                                                ng-disabled="item.outboundStatus===3||item.outboundStatus===2||!btnPermission.salesDonateOutMandatoryFinish">结单</button>
                                            <button class="btn btn-operate m-r-xs" ng-click="goSettlement(item)"
                                                ng-disabled="item.isState!==1||item.checkState===2||!btnPermission.salesDonateOutSettlement">结算</button>

                                            <!-- wangcan：增加过账按钮，调用发货通知单过账接口——判断逻辑:什么类型的数据不能过账? -->
                                            <button class="btn btn-operate m-r-xs" ng-click="goTransfer(item)"
                                                ng-disabled="item.isState!==1||item.checkState===2||!btnPermission.salesDonateOutSettlement">过账</button>

                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataList track by $index"
                                    ng-class="{'row-selected': $index === markInfo.cueRow}"
                                    ng-click="selectRow($index)">
                                    <td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <span
                                            ng-if="!itemCol.clickFn && itemCol.type !== 'operate'">{{item[itemCol.dataField]}}</span>
                                        <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)"
                                            ng-if="!!itemCol.clickFn">
                                            {{item[itemCol.dataField]}}
                                        </a>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-check-box class="m-t-xs m-r-sm" yb-checked="markInfo.allCheckedBill" yb-check-name="全选"
                    yb-click="selectAll(dataList, 'Bill')"></div>
                <button class="btn btn-operate" ng-click="delData('batch')"
                    ng-disabled="!btnPermission.salesDonateOutDel"
                    title="{{!btnPermission.salesDonateOutDel?'无权限执行此操作':''}}">删除</button>
                <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
            </div>
        </div>


        <!-- 2、页面二：新增页面 -->
        <div tab heading="{{tabFlag.name}}" active="activeFlag[1]" ng-if="activeFlag[1]">
            <div class="clearfix" ng-show="stepList.curStep == 0">
                <div class="row wrapper-y-sm">
                    <div class="search-bar wrapper-none">
                        <div class="normal-search clearfix">
                            <label class="control-label">销售单号：</label>
                            <input type="text" class="form-control m-r-sm" style="width: 170px"
                                ng-model="orderCondition.salesBillNo">
                            <label class="control-label">服务人员：</label>
                            <input type="text" class="form-control m-r-sm" ng-model="orderCondition.servicePersonName">
                            <label class="control-label">客户名称：</label>
                            <input type="text" class="form-control m-r-sm" ng-model="orderCondition.clientName">

                            <span class="btn btn-primary" ng-click="orderSearch(1)">搜索</span>
                        </div>
                    </div>
                </div>
                <div class="main-area">
                    <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                        <div class="th-fixed">
                            <table class="table-fixed border-none" width="{{salesDonateOutTbConfig.fixedWidth}}">
                                <thead>
                                    <tr class="border-r-none">
                                        <th ng-repeat="itemCol in salesDonateOutTbConfig.tableCol track by $index"
                                            width="{{itemCol.width}}"
                                            ng-click="toSort(salesDonateOutTbConfig.tableCol, $index)"
                                            ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                            <div yb-thead-operate ng-model="itemCol"
                                                target-width="salesDonateOutTbConfig.fixedWidth"
                                                fixed-width="salesDonateOutTbStyle.scrollLeft"></div>
                                        </th>
                                    </tr>
                                </thead>
                            </table>
                        </div>
                        <div class="th-scroll-x" ng-style="salesDonateOutTbStyle.scrollLeft">
                            <table class="table-fixed border-none" width="{{salesDonateOutTbConfig.scrollWidth}}">
                                <thead>
                                    <tr>
                                        <th ng-repeat="itemCol in salesDonateOutTbConfig.tableCol track by $index"
                                            width="{{itemCol.width}}"
                                            ng-click="toSort(salesDonateOutTbConfig.tableCol, $index)"
                                            ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                            <div yb-thead-operate ng-model="itemCol"
                                                target-width="salesDonateOutTbConfig.scrollWidth"></div>
                                        </th>
                                    </tr>
                                </thead>
                            </table>
                        </div>
                        <div class="td-scroll-y" ng-show="orderDataList.length > 0">
                            <table class="table-fixed border-none" width="{{salesDonateOutTbConfig.fixedWidth}}">
                                <tbody>
                                    <tr ng-repeat="item in orderDataList track by $index"
                                        ng-class="{'row-selected': $index === markInfo.cueRow}"
                                        ng-click="selectRow($index)">
                                        <td class="spill-dots"
                                            ng-repeat="itemCol in salesDonateOutTbConfig.tableCol track by $index"
                                            width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                            title="{{item[itemCol.dataField]}}">
                                            <span
                                                ng-if="!itemCol.clickFn && itemCol.type !== 'operate'">{{item[itemCol.dataField]}}</span>
                                            <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)"
                                                ng-if="!!itemCol.clickFn">
                                                {{item[itemCol.dataField]}}
                                            </a>
                                            <div class="font-0" ng-if="itemCol.type === 'operate'">
                                                <button class="btn btn-operate m-r-xs"
                                                    ng-click="orderDataList(item)">选择</button>
                                            </div>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="td-scroll" ng-show="orderDataList.length > 0"
                            ng-style="salesDonateOutTbStyle.scrollLeft">
                            <table class="table-fixed border-none" width="{{salesDonateOutTbConfig.scrollWidth}}">
                                <tbody>
                                    <tr ng-repeat="item in orderDataList track by $index"
                                        ng-class="{'row-selected': $index === markInfo.cueRow}"
                                        ng-click="selectRow($index)">
                                        <td class="spill-dots"
                                            ng-repeat="itemCol in salesDonateOutTbConfig.tableCol track by $index"
                                            width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                            title="{{item[itemCol.dataField]}}">
                                            <span
                                                ng-if="!itemCol.clickFn && itemCol.type !== 'operate'">{{item[itemCol.dataField]}}</span>
                                            <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)"
                                                ng-if="!!itemCol.clickFn">
                                                {{item[itemCol.dataField]}}
                                            </a>
                                            <div class="font-0" ng-if="itemCol.type === 'operate'">
                                                <button class="btn btn-operate" ng-click="orderSelectSingle(item)"
                                                    ng-disabled="item.status == '0' || item.isReady === 1 || !btnPermission.deliveryNoticeReady"
                                                    title="{{!btnPermission.deliveryNoticeReady?'无权限执行此操作':''}}">选择</button>
                                            </div>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="no-data w-full text-center p-t" ng-show="orderDataList.length === 0">暂时没有数据</div>
                    </div>
                </div>
                <div class="bottom-area page-bar wrapper-y-sm clearfix">
                    <div yb-page-info ng-model="orderPageInfo" yb-refresh="orderSearch()"></div>
                </div>
            </div>

            <!-- 新建点击列表“选择”后跳转到新建页面 -->
            <div class="clearfix" ng-show="stepList.curStep == 1">
                <div class="panel-bar clearfix">
                    <div class="pull-left">
                        <i></i>基本信息
                    </div>
                    <div class="pull-right" ng-click="switchDetailBar(0)">
                        <span ng-show="!detailFlag[0]" title="展开"><i class="yb-icon ico-angle-double-down"></i></span>
                        <span ng-show="detailFlag[0]" title="收起"><i class="yb-icon ico-angle-double-up"></i></span>
                    </div>
                </div>
                <form name="orderForm" class="form-horizontal form-up-tb border-b p-t-xs clearfix"
                    ng-show="detailFlag[0]">
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 control-label max-w-100 spill-dots" title="销售单订单号">销售单订单号：</label>
                        <div class="col-xs-8 control-label p-l-n text-left spill-dots"
                            title="{{detailInfo.headerInfo.salesBillNo || '-'}}">
                            {{detailInfo.headerInfo.salesBillNo || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 control-label max-w-100">销售出库单号：</label>
                        <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                            {{detailInfo.headerInfo.salesOutBillNo || "-"}}
                        </label>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 control-label max-w-100">客户名称：</label>
                        <label class="col-xs-8 control-label p-l-n text-left">
                            {{detailInfo.headerInfo.clientName}}
                        </label>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 control-label max-w-100">使用整机编号：</label>
                        <label class="col-xs-8 control-label p-l-n text-left">
                            {{detailInfo.headerInfo.useMachineNo||'-'}}
                        </label>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 control-label max-w-100"><i>*</i>发出仓库：</label>
                        <label ng-if="tabFlag.type === 1" class="col-xs-8 control-label p-l-n text-left">
                            {{detailInfo.headerInfo.outArea||'-'}}
                        </label>
                        <div ng-if="tabFlag.type === 0" class="col-xs-8 wrapper-none">
                            <div yb-form-clear ng-model="detailInfo.headerInfo.outArea" select-obj="selectWarehouse()"
                                clear-form="clearWarehouse()" tips-name="发出仓库" form-require="true"></div>

                            <div class="msg-block" ng-if="!detailInfo.headerInfo.outArea && submitted">
                                <div class="error-msg">
                                    <div class="msg-triangle"></div>
                                    请选择发出仓库
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 control-label max-w-100">收货人：</label>
                        <div class="col-xs-8 wrapper-none">
                            <input type="text" name="consignee" class="form-control"
                                ng-model="detailInfo.headerInfo.consignee" yb-focus maxlength="11">
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 control-label max-w-100">联系方式：</label>
                        <div class="col-xs-8 wrapper-none">
                            <input type="text" name="contactPhone" class="form-control"
                                ng-model="detailInfo.headerInfo.contactPhone" yb-focus maxlength="11">
                        </div>
                    </div>

                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 control-label max-w-100">收货地址：</label>
                        <div class="col-xs-8 wrapper-none">
                            <input type="text" name="receiptAddress" class="form-control"
                                ng-model="detailInfo.headerInfo.receiptAddress" yb-focus maxlength="400">
                        </div>
                    </div>

                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 control-label max-w-100">服务人员：</label>
                        <label class="col-xs-8 control-label p-l-n text-left">
                            {{detailInfo.headerInfo.servicePersonName}}
                        </label>
                    </div>

                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 control-label max-w-100">制单时间：</label>
                        <label class="col-xs-8 control-label p-l-n text-left">
                            {{detailInfo.headerInfo.generateDateStr}}
                        </label>
                    </div>

                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 control-label max-w-100">备注：</label>
                        <div class="col-xs-8 wrapper-none">
                            <input type="text" name="note" class="form-control" ng-model="detailInfo.headerInfo.remark"
                                maxlength="200">
                        </div>
                    </div>


                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 control-label max-w-100">订单类型：</label>
                        <div class="col-xs-8 control-label p-l-n text-left"
                            title="{{detailInfo.headerInfo.billTypeStr || '-'}}">
                            {{detailInfo.headerInfo.billTypeStr}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 control-label max-w-100">总价：</label>
                        <label class="col-xs-8 control-label p-l-n text-left">
                            {{detailInfo.headerInfo.totalOrderPrice}}
                        </label>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm" ng-if="!!costPriceShow">
                        <label class="col-xs-4 control-label max-w-100">成本总价：</label>
                        <label class="col-xs-8 control-label p-l-n text-left">
                            {{detailInfo.headerInfo.costTotal}}
                        </label>
                    </div>
                </form>
                <div class="row wrapper-y-xs">
                    <div class="col-xs-12 operate-bar font-0">
                        <button class="btn btn-operate m-r-sm" ng-click="batchDelMateriel()">批量删除</button>
                        <div class="pull-right m-r-xs" title="{{!btnPermission.showCostPrice?'无权限执行此操作':''}}">
                            <label class="font-12 m-r-xs">显示成本价:</label>
                            <toggle ng-model="costPriceShow" yb-disabled="!btnPermission.showCostPrice"></toggle>
                        </div>
                    </div>
                </div>
                <div class="main-area d-b-60" ng-style="{'top': !!detailFlag[0] ? '290px' : '110px'}">
                    <div yb-table-fixed class="table-fixed-wrap">
                        <div class="th-scroll-x">
                            <table class="table-fixed border-none" width="{{tableMaterialConfig.scrollWidth}}">
                                <thead>
                                    <tr>
                                        <th width="40" class="th-check text-center">
                                            <div yb-check-box yb-checked="markInfo.allCheckedMaterial"
                                                yb-click="selectAll(detailInfo.materialList, 'Material')"></div>
                                        </th>
                                        <th width="60" class="border-l-none">
                                            操作
                                        </th>
                                        <th ng-repeat="itemCol in tableMaterialConfig.tableCol track by $index"
                                            width="{{itemCol.width}}"
                                            ng-click="materialToSort(tableMaterialConfig.tableCol, $index)"
                                            ng-show="!!itemCol.isShow && !itemCol.isFixed && (itemCol.type!=='cost'||costPriceShow)">
                                            <div yb-thead-operate ng-model="itemCol"
                                                target-width="purchaseTbConf.scrollWidth"></div>
                                        </th>
                                    </tr>
                                </thead>
                            </table>
                        </div>
                        <div class="td-scroll" ng-show="detailInfo.materialList.length > 0">
                            <table class="table-fixed border-none" width="{{tableMaterialConfig.scrollWidth}}">
                                <tbody>
                                    <tr ng-repeat="item in detailInfo.materialList track by $index">
                                        <td width="40" class="text-center">
                                            <div yb-check-box yb-checked="item.isChecked"
                                                yb-click="selectSingle(item, detailInfo.materialList, 'Material')"
                                                yb-disabled="item.status == 2 || item.status == 3"></div>
                                        </td>
                                        <td width="60" class="font-0">
                                            <button class="btn btn-operate"
                                                ng-disabled="item.status == 2 || item.status == 3"
                                                ng-click="delMaterial($index)">删除</button>
                                        </td>
                                        <td ng-repeat="itemCol in tableMaterialConfig.tableCol"
                                            width="{{itemCol.width}}"
                                            ng-show="!!itemCol.isShow && !itemCol.isFixed && (itemCol.type!=='cost'||costPriceShow)">
                                            <div class="spill-dots"
                                                ng-if="(!itemCol.isInput&&!itemCol.isRemark) || item.status == 2 || item.status == 3"
                                                title="{{item[itemCol.dataField]}}">
                                                <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)"
                                                    ng-if="!!itemCol.clickFn">
                                                    {{item[itemCol.dataField]}}
                                                </a>
                                                <span ng-if="!itemCol.clickFn">
                                                    {{item[itemCol.dataField]}}
                                                </span>
                                            </div>
                                            <div class="td-edit pos-r"
                                                ng-if="itemCol.isInput && (!item.status || item.status == 0 || item.status == 1)">
                                                <!-- 判断本次发货是不是大于订单总数或者实际库存 -->
                                                <input type="text" class="form-control"
                                                    ng-model="item[itemCol.dataField]" ng-change="checkQty(item)"
                                                    ng-focus="showQtyTip(item)" ng-blur="hideQtyTip(item)"
                                                    yb-number-input disable-decimal="false" decimal-places="3"
                                                    ng-class="{'error': item.qtyErr, 'high-warning': item.qtyStockErr && (item.qtyStockErrLevel == 3),
                                                    'mid-warning': item.qtyStockErr  && (item.qtyStockErrLevel == 2), 'low-warning': item.qtyStockErr  && (item.qtyStockErrLevel == 1)}">
                                                <div class="pos-a tool-tips" ng-if="!!item.qtyErr">
                                                    <i class="triangle"></i>
                                                    <div class="msg">{{item.qtyErrMsg}}</div>
                                                </div>
                                                <div class="pos-a tool-tips" ng-if="!!item.showStockErr">
                                                    <i class="triangle"></i>
                                                    <div class="msg">{{item.qtyErrMsg}}</div>
                                                </div>
                                            </div>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="no-data w-full text-center p-t" ng-show="detailInfo.materialList.length === 0">
                            暂时没有数据</div>
                    </div>
                </div>
                <div class="bottom-area btn-bar text-center clearfix">
                    <button type="button" class="btn btn-default m-r-sm" ng-click="stepList.curStep = 0"
                        ng-if="!detailInfo.headerInfo.id&&!markInfo.fromSaleDonateOut">上一步</button>
                    <button type="button" class="btn btn-primary m-r-sm" ng-disabled="clickValue"
                        ng-click="saveData(orderForm.$valid,saveStateEnum.save)">保存</button>
                    <button type="button" class="btn btn-primary m-r-sm" ng-disabled="clickValue"
                        ng-click="saveData(orderForm.$valid,saveStateEnum.submit)">提交</button>
                    <button type="button" class="btn btn-default" ng-click="changeTab(0)">取消</button>
                </div>
            </div>
        </div>


        <!-- 3、页面三：查看页面 -->
        <div tab heading="详情" active="activeFlag[2]" ng-if="activeFlag[2]">
            <div class="main-area d-b-60" style="top:35px;">
                <div class="m-t-sm form-up-tb clearfix">
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100 spill-dots" title="出库单号">出库单号：</label>
                        <div class="col-xs-8 wrapper-none spill-dots"
                            title="{{detailInfo.headerInfo.salesOutBillNo || '-'}}">
                            {{detailInfo.headerInfo.salesOutBillNo || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100">销售单号：</label>
                        <div class="col-xs-8 wrapper-none spill-dots"
                            title="{{detailInfo.headerInfo.salesBillNo || '-'}}">
                            {{detailInfo.headerInfo.salesBillNo || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100">借用单号：</label>
                        <div class="col-xs-8 wrapper-none spill-dots"
                            title="{{detailInfo.headerInfo.borrowBillNo || '-'}}">
                            {{detailInfo.headerInfo.borrowBillNo || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100">客户名称：</label>
                        <div class="col-xs-8 wrapper-none spill-dots"
                            title="{{detailInfo.headerInfo.clientName || '-'}}">
                            {{detailInfo.headerInfo.clientName || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100">制单人：</label>
                        <div class="col-xs-8 wrapper-none spill-dots"
                            title="{{detailInfo.headerInfo.generatePerson || '-'}}">
                            {{detailInfo.headerInfo.generatePerson || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100">制单时间：</label>
                        <div class="col-xs-8 wrapper-none spill-dots"
                            title="{{detailInfo.headerInfo.generateDateStr || '-'}}">
                            {{detailInfo.headerInfo.generateDateStr || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100">服务人员：</label>
                        <div class="col-xs-8 wrapper-none spill-dots"
                            title="{{detailInfo.headerInfo.servicePersonName || '-'}}">
                            {{detailInfo.headerInfo.servicePersonName || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100">出库状态：</label>
                        <div class="col-xs-8 wrapper-none spill-dots"
                            title="{{detailInfo.headerInfo.outboundStatusStr || '-'}}">
                            {{detailInfo.headerInfo.outboundStatusStr || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100">发出仓库：</label>
                        <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.headerInfo.outArea || '-'}}">
                            {{detailInfo.headerInfo.outArea || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100">收货人：</label>
                        <div class="col-xs-8 wrapper-none spill-dots"
                            title="{{detailInfo.headerInfo.consignee || '-'}}">
                            {{detailInfo.headerInfo.consignee || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100">联系方式：</label>
                        <div class="col-xs-8 wrapper-none spill-dots"
                            title="{{detailInfo.headerInfo.contactPhone || '-'}}">
                            {{detailInfo.headerInfo.contactPhone || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100">收货地址：</label>
                        <div class="col-xs-8 wrapper-none spill-dots"
                            title="{{detailInfo.headerInfo.receiptAddress || '-'}}">
                            {{detailInfo.headerInfo.receiptAddress || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100">出库时间：</label>
                        <div class="col-xs-8 wrapper-none spill-dots"
                            title="{{detailInfo.headerInfo.outboundDateStr || '-'}}">
                            {{detailInfo.headerInfo.outboundDateStr || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100">结算状态：</label>
                        <div class="col-xs-8 wrapper-none spill-dots"
                            title="{{detailInfo.headerInfo.checkStateShow || '-'}}">
                            {{detailInfo.headerInfo.checkStateShow || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100">备注：</label>
                        <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.headerInfo.remark || '-'}}">
                            {{detailInfo.headerInfo.remark || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100 spill-dots" title="总价">总价：</label>
                        <div class="col-xs-8 wrapper-none spill-dots"
                            title="{{detailInfo.headerInfo.totalPrice || '-'}}">
                            {{detailInfo.headerInfo.totalPrice || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm" ng-if="!!costPriceShow">
                        <label class="col-xs-4 m-b-n text-right max-w-100 spill-dots" title="成本总价">成本总价：</label>
                        <div class="col-xs-8 wrapper-none spill-dots"
                            title="{{detailInfo.headerInfo.costTotal || '-'}}">
                            {{detailInfo.headerInfo.costTotal || "-"}}
                        </div>
                    </div>
                </div>
                <div class="row wrapper-y-xs">
                    <div class="col-xs-12 operate-bar font-0">
                        <div class="pull-right m-r-xs" title="{{!btnPermission.showCostPrice?'无权限执行此操作':''}}">
                            <label class="font-12 m-r-xs">显示成本价:</label>
                            <toggle ng-model="costPriceShow" yb-disabled="!btnPermission.showCostPrice"></toggle>
                        </div>
                    </div>
                </div>
                <div yb-table-fixed class="table-fixed-wrap" ng-style="{'top': !!costPriceShow ? '190px' : '160px'}">
                    <div class="th-scroll-x">
                        <table class="table-fixed border-none" width="{{tableMaterialConfig.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th width="90" class="border-l-none">
                                        操作
                                    </th>
                                    <th ng-repeat="itemCol in tableMaterialConfig.tableCol track by $index"
                                        width="{{itemCol.width}}"
                                        ng-show="!!itemCol.isShow && !itemCol.isFixed && (itemCol.type!=='cost'||costPriceShow)">
                                        <div yb-thead-operate ng-model="itemCol"
                                            target-width="purchaseTbConf.scrollWidth"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="detailInfo.materialList.length > 0">
                        <table class="table-fixed border-none" width="{{tableMaterialConfig.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in detailInfo.materialList track by $index">
                                    <td width="90" class="font-0">
                                        <button class="btn btn-operate"
                                            ng-click="mandatoryFinish(detailInfo.headerInfo,detailInfo.headerInfo.id, item.materialNo)"
                                            ng-disabled="item.outboundStatus===3||item.outboundStatus===2">结单</button>
                                    </td>
                                    <td class="spill-dots"
                                        ng-repeat="itemCol in tableMaterialConfig.tableCol track by $index"
                                        width="{{itemCol.width}}"
                                        ng-show="!!itemCol.isShow && !itemCol.isFixed && (itemCol.type!=='cost'||costPriceShow)"
                                        title="{{item[itemCol.dataField]}}">
                                        <span>{{item[itemCol.dataField]}}</span>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="detailInfo.materialList.length === 0">暂时没有数据
                    </div>
                </div>
            </div>
            <div class="bottom-area btn-bar text-center clearfix">
                <button type="button" class="btn btn-primary m-r-sm"
                    ng-click="mandatoryFinish(detailInfo.headerInfo,detailInfo.headerInfo.id)"
                    ng-disabled="detailInfo.headerInfo.outboundStatus===3||detailInfo.headerInfo.outboundStatus===2">结单</button>
                <button type="button" class="btn btn-default" ng-click="changeTab(0)">返回</button>
            </div>
        </div>


        <!-- 页面四：操作出库页面 -->
        <div tab heading="出库" active="activeFlag[3]" ng-if="activeFlag[3]">
            <div class="main-area d-b-60" style="top:35px;">
                <div class="m-t-sm form-up-tb clearfix">
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100 spill-dots" title="出库单号">出库单号：</label>
                        <div class="col-xs-8 wrapper-none spill-dots"
                            title="{{detailInfo.headerInfo.salesOutBillNo || '-'}}">
                            {{detailInfo.headerInfo.salesOutBillNo || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100">销售单号：</label>
                        <div class="col-xs-8 wrapper-none spill-dots"
                            title="{{detailInfo.headerInfo.salesBillNo || '-'}}">
                            {{detailInfo.headerInfo.salesBillNo || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100">借用单号：</label>
                        <div class="col-xs-8 wrapper-none spill-dots"
                            title="{{detailInfo.headerInfo.borrowBillNo || '-'}}">
                            {{detailInfo.headerInfo.borrowBillNo || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100">客户名称：</label>
                        <div class="col-xs-8 wrapper-none spill-dots"
                            title="{{detailInfo.headerInfo.clientName || '-'}}">
                            {{detailInfo.headerInfo.clientName || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100">制单人：</label>
                        <div class="col-xs-8 wrapper-none spill-dots"
                            title="{{detailInfo.headerInfo.generatePerson || '-'}}">
                            {{detailInfo.headerInfo.generatePerson || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100">制单时间：</label>
                        <div class="col-xs-8 wrapper-none spill-dots"
                            title="{{detailInfo.headerInfo.generateDate || '-'}}">
                            {{detailInfo.headerInfo.generateDate || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100">服务人员：</label>
                        <div class="col-xs-8 wrapper-none spill-dots"
                            title="{{detailInfo.headerInfo.servicePersonName || '-'}}">
                            {{detailInfo.headerInfo.servicePersonName || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100">出库状态：</label>
                        <div class="col-xs-8 wrapper-none spill-dots"
                            title="{{detailInfo.headerInfo.outboundStatusStr || '-'}}">
                            {{detailInfo.headerInfo.outboundStatusStr || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100">出库时间：</label>
                        <div class="col-xs-8 wrapper-none spill-dots"
                            title="{{detailInfo.headerInfo.outboundDateStr || '-'}}">
                            {{detailInfo.headerInfo.outboundDateStr || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100">发出仓库：</label>
                        <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.headerInfo.outArea || '-'}}">
                            {{detailInfo.headerInfo.outArea || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100 spill-dots" title="总价">总价：</label>
                        <div class="col-xs-8 wrapper-none spill-dots"
                            title="{{detailInfo.headerInfo.totalPrice || '-'}}">
                            {{detailInfo.headerInfo.totalPrice || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100">结算状态：</label>
                        <div class="col-xs-8 wrapper-none spill-dots"
                            title="{{detailInfo.headerInfo.checkStateShow || '-'}}">
                            {{detailInfo.headerInfo.checkStateShow || "-"}}
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 m-b-n text-right max-w-100">备注：</label>
                        <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.headerInfo.remark || '-'}}">
                            {{detailInfo.headerInfo.remark || "-"}}
                        </div>
                    </div>
                </div>
                <div class="row wrapper-y-xs">
                    <div class="col-xs-12 operate-bar font-0">
                        <button class="btn btn-operate m-r-sm" ng-click="multiSelDepot()">批量选择储位</button>
                    </div>
                </div>
                <div yb-table-fixed class="table-fixed-wrap" style="top:160px">
                    <div class="th-scroll-x">
                        <table class="table-fixed border-none" width="{{outTbConf.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th width="40" class="th-check text-center">
                                        <div yb-check-box yb-checked="markInfo.allCheckedMaterial"
                                            yb-click="selectAll(detailInfo.materialList, 'Material')"></div>
                                    </th>
                                    <th ng-repeat="itemCol in outTbConf.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol"
                                            target-width="purchaseTbConf.scrollWidth"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="detailInfo.materialList.length > 0">
                        <table class="table-fixed border-none" width="{{outTbConf.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in detailInfo.materialList track by $index">
                                    <td width="40" class="text-center">
                                        <div yb-check-box yb-checked="item.isChecked"
                                            yb-click="selectSingle(item, detailInfo.materialList, 'Material')"></div>
                                    </td>
                                    <td ng-repeat="itemCol in outTbConf.tableCol track by $index"
                                        width="{{itemCol.width}}"
                                        ng-class="{'wrapper-none': itemCol.inputType === 'func'}"
                                        ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                        <div class="spill-dots" ng-if="!itemCol.input"
                                            title="{{item[itemCol.dataField]}}">
                                            {{item[itemCol.dataField]}}
                                        </div>
                                        <div yb-form-clear class="td-edit" ng-model="item[itemCol.dataField]"
                                            select-obj="selDepot(item)" clear-form="clearDepot(item)" tips-name="储位"
                                            ng-if="!!itemCol.input && itemCol.inputType === 'func'"
                                            title="{{item[itemCol.dataField]}}"></div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="detailInfo.materialList.length === 0">暂时没有数据
                    </div>
                </div>
            </div>
            <div class="bottom-area btn-bar text-center clearfix">
                <button type="button" class="btn btn-primary m-r-sm" ng-click="outboundSubmit()">确认出库</button>
                <button type="button" class="btn btn-default" ng-click="cancel()">取消</button>
            </div>
        </div>


        <!-- 页面五：操作结算页面 -->
        <div tab heading="结算" active="activeFlag[4]" ng-if="activeFlag[4]">
            <div class="pos-a-full shuttle-box left" style="right: 65%;top: 35px;">
                <div class="box-head clearfix">
                    <span class="font-14">
                        收款信息
                    </span>
                </div>
                <div class="pos-a-full box-body has-head has-foot border-t">
                    <form name="checkForm" class="main-wrap form-horizontal form-up-tb p-t clearfix" novalidate>
                        <div class="form-group col-xs-12">
                            <label class="col-xs-3 control-label"></label>
                            <label class="col-xs-8 control-label p-l-n text-left clearfix">
                                <span class="price-bg-span" title="{{settleInfo.donateOutObj.advancePayPrice||0}}"
                                    style="margin-left:0;">
                                    预收款：{{settleInfo.donateOutObj.advancePayPrice||0}}元
                                </span>
                                <span class="price-bg-span" ng-if="settleInfo.donateOutObj.useVehicleQuota"
                                    title="{{settleInfo.donateOutObj.useVehicleQuota||0}}">
                                    车辆额度：{{settleInfo.donateOutObj.useVehicleQuota||0}}元
                                </span>
                            </label>
                        </div>
                        <div class="form-group col-xs-12">
                            <label class="col-xs-3 control-label">客户：</label>
                            <label class="col-xs-8 control-label p-l-n text-left spill-dots"
                                title="{{settleInfo.donateOutObj.clientName}}">
                                {{settleInfo.donateOutObj.clientName}}
                            </label>
                        </div>
                        <div class="form-group col-xs-12">
                            <label class="col-xs-3 control-label">销售总额：</label>
                            <label class="col-xs-8 control-label p-l-n text-left clearfix">
                                {{settleInfo.donateOutObj.totalPrice}}
                            </label>
                        </div>
                        <div class="form-group col-xs-12">
                            <label class="col-xs-3 control-label">优惠金额：</label>
                            <div class="col-xs-8 wrapper-none">
                                <input type="text" name="discountPrice" class="form-control" ng-change="changeMoney()"
                                    ng-model="settleInfo.donateOutObj.discountPrice" yb-number-input
                                    max="settleInfo.donateOutObj.maxPrice" disable-decimal="false" decimal-places="2">
                            </div>
                        </div>
                        <div class="form-group col-xs-12" ng-if="settleInfo.donateOutObj.advancePayPrice">
                            <label class="col-xs-3 control-label">预收款扣减：</label>
                            <div class="col-xs-8 wrapper-none">
                                <input yb-number-input type="text" name="prePayPrice" class="form-control"
                                    ng-change="changePrePayMoney()" ng-model="settleInfo.donateOutObj.prePayPrice"
                                    disable-decimal="false" decimal-places="2"
                                    max="settleInfo.donateOutObj.advancePayPrice > settleInfo.donateOutObj.maxPrice?settleInfo.donateOutObj.maxPrice:settleInfo.donateOutObj.advancePayPrice">
                            </div>
                        </div>
                        <div class="form-group col-xs-12"
                            ng-if="settleInfo.donateOutObj.billType===3&&settleInfo.donateOutObj.useVehicleQuota">
                            <label class="col-xs-3 control-label">车辆额度扣减：</label>
                            <div class="col-xs-8 wrapper-none">
                                <input yb-number-input type="text" name="vehiclePrice" class="form-control"
                                    ng-change="changeVehicleQuota()" ng-model="settleInfo.donateOutObj.vehiclePrice"
                                    disable-decimal="false" decimal-places="2"
                                    max="settleInfo.donateOutObj.useVehicleQuota > settleInfo.donateOutObj.maxPrice?settleInfo.donateOutObj.maxPrice:settleInfo.donateOutObj.useVehicleQuota">
                            </div>
                        </div>
                        <div class="form-group col-xs-12">
                            <label class="col-xs-3 control-label">实际收款金额：</label>
                            <div class="col-xs-8 wrapper-none">
                                <input type="text" name="cashMoney" class="form-control" ng-change="changeMoney('cash')"
                                    ng-model="settleInfo.donateOutObj.cashMoney" yb-number-input
                                    max="settleInfo.donateOutObj.maxPrice" disable-decimal="false" decimal-places="2">
                            </div>
                        </div>
                        <div class="form-group col-xs-12">
                            <label class="col-xs-3 control-label">欠款金额：</label>
                            <label ng-class="{'danger-color': settleInfo.donateOutObj.debt<0}"
                                class="col-xs-8 control-label p-l-n text-left spill-dots">
                                {{settleInfo.donateOutObj.debt || 0}}
                                <span ng-if="settleInfo.donateOutObj.debt<0">
                                    （付款金额已超过销售总额，请修改）
                                </span>
                            </label>
                        </div>
                        <div class="form-group col-xs-12">
                            <label class="col-xs-3 control-label"><i>*</i>经办人：</label>
                            <div class="col-xs-8 wrapper-none">
                                <input type="text" name="operatorName" class="form-control light-bg"
                                    ng-model="settleInfo.donateOutObj.operatorName" ng-click="selectOperator()" required
                                    yb-focus readonly placeholder="请选择">

                                <div class="msg-block"
                                    ng-show="checkForm.operatorName.$dirty || (checkForm.operatorName.$invalid && submitted)">
                                    <div class="error-msg"
                                        ng-if="checkForm.operatorName.$error.required && !checkForm.operatorName.focused">
                                        <div class="msg-triangle"></div>
                                        必填项，请填写
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="form-group col-xs-12">
                            <label class="col-xs-3 control-label">收款时间：</label>
                            <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                                {{settleInfo.donateOutObj.createDate | YbDate:"yyyy-MM-dd HH:mm:ss"}}
                            </label>
                        </div>
                        <div class="form-group col-xs-12">
                            <label class="col-xs-3 control-label">备注：</label>
                            <div class="col-xs-8 wrapper-none">
                                <input type="text" name="note" class="form-control"
                                    ng-model="settleInfo.donateOutObj.note" maxlength="200">
                            </div>
                        </div>
                    </form>
                </div>
                <div class="bottom-area btn-bar text-center border-t clearfix">
                    <button type="button" class="btn btn-primary m-r-sm"
                        ng-click="saveAddReceipt(checkForm.$valid)">提交</button>
                    <button type="button" class="btn btn-default" ng-click="changeTab(0)">取消</button>
                </div>
            </div>
            <div class="pos-a-full shuttle-box right" style="left: 35%;top: 35px;bottom: 10px">
                <div class="box-head clearfix">
                    <span class="font-14">
                        收款单据
                    </span>
                </div>
                <div class="pos-a-full box-body has-head border-t">
                    <div yb-table-fixed class="table-fixed-wrap" style="top: 15px;left: 0">
                        <div class="th-scroll-x">
                            <table class="table-fixed border-none" width="{{settleInfo.tableConfig.scrollWidth}}">
                                <thead>
                                    <tr>
                                        <th ng-repeat="itemCol in settleInfo.tableConfig.tableCol track by $index"
                                            width="{{itemCol.width}}" ng-show="!!itemCol.isShow">
                                            <div yb-thead-operate ng-model="itemCol"
                                                target-width="receiptTableInfo.tableConfig.scrollWidth"></div>
                                        </th>
                                    </tr>
                                </thead>
                            </table>
                        </div>
                        <div class="td-scroll" ng-show="settleInfo.dataList.length > 0">
                            <table class="table-fixed border-none" width="{{settleInfo.tableConfig.scrollWidth}}">
                                <tbody>
                                    <tr ng-repeat="item in settleInfo.dataList track by $index">
                                        <td class="spill-dots"
                                            ng-repeat="itemCol in settleInfo.tableConfig.tableCol track by $index"
                                            width="{{itemCol.width}}" ng-show="!!itemCol.isShow"
                                            title="{{item[itemCol.dataField]}}">
                                            <div ng-switch="itemCol.type">
                                                <div ng-switch-when="click">
                                                    <a class="btn-operate m-r-xs"
                                                        ng-click="tdClick(settleInfo.viewDetailItem, itemCol.clickFn)">
                                                        {{item[itemCol.dataField]}}
                                                    </a>
                                                </div>
                                                <div ng-switch-default>
                                                    <span>{{item[itemCol.dataField]}}</span>
                                                </div>
                                            </div>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="no-data w-full text-center p-t" ng-show="receiptTableInfo.dataList.length === 0">
                            暂时没有数据
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>